<template>
  <div id="app">

    <router-view />
  </div>
</template>

<script>
export default {
  name: 'app',
 data() {
   return {
     //设备分类模块
     msgs:null,
   }
 },
 watch:{
   // msgs(){
   //   console.log('改变了'+this.msgs);
   // }
 },
  beforeCreate() {
    //beforeCreate()，created(), beforeMount(), mounted() 都可以
    // console.log(this.$route);
    if (this.$route.path !== '/home') {
      this.$router.replace('/');
      window.location.reload();
    }
  }
};
</script>

<style lang="less" scoped>
@import 'assets/css/base.css';
</style>
